<template>
    <div>
        <div class="drainage-content">
            <div class="top-info">
                <i class="icon"></i>
                引流工具
            </div>
            <a href="/wap/wx/login?fk=1-23-0-0">
                 <div class="same-box">
                    <div class="bottom-info">微传媒（广告引流</div>
                    <div class="mc-con"></div>
                </div>
            </a>       
            <div class="same-box same-box1" @click="hint">
                <div class="bottom-info">精准推（窄告引流）</div>
                <div class="mc-con"></div>
            </div>
            <div class="newshequn" @click="newzeng()" v-show="newben">
                  <div class="bottom-info">首象社群</div>
                <div class="mc-con"></div>
            </div>
        </div>
        <!-- <a href="javascript:void (0)" class="backTo" onclick="javascript:history.back(-1);">返回</a> -->
    </div>
</template>
<style scoped>
    @import "../../assets/business/css/drainage.css";

    .jinqian {
        margin-left: 6rem;
    }
</style>
<script>
export default {
    data () {
        return {
            companyid:this.$route.query.companyid,
            newben:true
        }
    },
    mounted(){
        // this.info()
        console.log(this.companyid)
    },
    methods:{
        info(){
          this.$http.get(this.APIURL_PREFIX + '/api/wap/company/community/'+this.companyid).then((response) => {
               console.log(response)

              if(response.data.data.payCommunity==0){
                    this.newben=true
                    
              }else{
                   this.newben=false
              }


         }).catch(function (err) {
                console.log(err)
         });

        },
        newzeng(){
            console.log(this.companyid)
             
             this.$http.get(this.APIURL_PREFIX + '/api/wap/company/community/'+this.companyid).then((response) => {
               console.log(response)

              if(response.data.data.payCommunity==0){
                    // this.newben=true
                    window.location='/wap/new_pay.html'
                    
              }else{
                //    this.newben=false
                window.location='/wap/hudong.html?id='+this.companyid
              }
                }).catch(function (err) {
                console.log(err)
         });
        },
        hint:function(){
            layer.msg("敬请期待")
        }
    }
}
</script>
